package com.shb.manager.web;

import com.shb.manager.pojo.User;
import com.shb.manager.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@ResponseBody
@Controller
public class TestController {
    @Autowired
    private TestService testService;
    @RequestMapping("/index")
    public List<User> method(){
        List<User> list = testService.listUser();
        System.out.println(list);
        return list;
    }
}
